package ace.module.article.api.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import jakarta.validation.constraints.*;
import jakarta.annotation.Nullable;
import java.io.Serializable;

/**
* 文章 data transform object.
*
* @author Caspar
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = ArtArticleDto.TABLE_DESC)
public class ArtArticleDto implements Serializable {

  public static final String TABLE_NAME = "art_article";
  public static final String TABLE_DESC = "文章";
  public static final String ID_COLUMN_NAME = "id";
  public static final String ID_TITLE = "id";
  public static final String ID_DESC = "";
  public static final String ART_APP_ID_COLUMN_NAME = "art_app_id";
  public static final String ART_APP_ID_TITLE = "文章应用id";
  public static final String ART_APP_ID_DESC = "";
  public static final String KEY_COLUMN_NAME = "key";
  public static final String KEY_TITLE = "文章key";
  public static final String KEY_DESC = "";
  public static final String AUTHOR_ID_COLUMN_NAME = "author_id";
  public static final String AUTHOR_ID_TITLE = "作者id";
  public static final String AUTHOR_ID_DESC = "";
  public static final String AUTHOR_NAME_COLUMN_NAME = "author_name";
  public static final String AUTHOR_NAME_TITLE = "作者名称";
  public static final String AUTHOR_NAME_DESC = "";
  public static final String KEYWORD_COLUMN_NAME = "keyword";
  public static final String KEYWORD_TITLE = "关键词";
  public static final String KEYWORD_DESC = "";
  public static final String SUMMARY_COLUMN_NAME = "summary";
  public static final String SUMMARY_TITLE = "摘要";
  public static final String SUMMARY_DESC = "";
  public static final String COVER_IMAGE_COLUMN_NAME = "cover_image";
  public static final String COVER_IMAGE_TITLE = "封面图";
  public static final String COVER_IMAGE_DESC = "";
  public static final String NAME_COLUMN_NAME = "name";
  public static final String NAME_TITLE = "名称";
  public static final String NAME_DESC = "";
  public static final String CONTENT_COLUMN_NAME = "content";
  public static final String CONTENT_TITLE = "内容";
  public static final String CONTENT_DESC = "";
  public static final String DELETE_FLAG_COLUMN_NAME = "delete_flag";
  public static final String DELETE_FLAG_TITLE = "删除标识";
  public static final String DELETE_FLAG_DESC = "0-未删除";
  public static final String CREATE_TIME_COLUMN_NAME = "create_time";
  public static final String CREATE_TIME_TITLE = "创建时间";
  public static final String CREATE_TIME_DESC = "单位-毫秒";
  public static final String UPDATE_TIME_COLUMN_NAME = "update_time";
  public static final String UPDATE_TIME_TITLE = "更新时间";
  public static final String UPDATE_TIME_DESC = "单位-毫秒";
  public static final String ROW_VERSION_COLUMN_NAME = "row_version";
  public static final String ROW_VERSION_TITLE = "版本号和乐观锁";
  public static final String ROW_VERSION_DESC = "";

  @Schema(title = ID_TITLE, description = ID_DESC)
  private Long id;

  @Schema(title = ART_APP_ID_TITLE, description = ART_APP_ID_DESC)
  private Long artAppId;

  @Size(max = 255)
  @Schema(title = KEY_TITLE, description = KEY_DESC)
  private String key;

  @Schema(title = AUTHOR_ID_TITLE, description = AUTHOR_ID_DESC)
  private Long authorId;

  @Size(max = 255)
  @Schema(title = AUTHOR_NAME_TITLE, description = AUTHOR_NAME_DESC)
  private String authorName;

  @Size(max = 255)
  @Schema(title = KEYWORD_TITLE, description = KEYWORD_DESC)
  private String keyword;

  @Size(max = 255)
  @Schema(title = SUMMARY_TITLE, description = SUMMARY_DESC)
  private String summary;

  @Schema(title = COVER_IMAGE_TITLE, description = COVER_IMAGE_DESC)
  private String cover_image;

  @Size(max = 255)
  @Schema(title = NAME_TITLE, description = NAME_DESC)
  private String name;

  @Schema(title = CONTENT_TITLE, description = CONTENT_DESC)
  private String content;

  @Schema(title = DELETE_FLAG_TITLE, description = DELETE_FLAG_DESC)
  private Long deleteFlag;

  @Schema(title = CREATE_TIME_TITLE, description = CREATE_TIME_DESC)
  private Long createTime;

  @Schema(title = UPDATE_TIME_TITLE, description = UPDATE_TIME_DESC)
  private Long updateTime;

  @Schema(title = ROW_VERSION_TITLE, description = ROW_VERSION_DESC)
  private Long rowVersion;

}